package com.ruoyi.video.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.video.mapper.VideoCompanyTemplateMapper;
import com.ruoyi.video.domain.VideoCompanyTemplate;
import com.ruoyi.video.service.IVideoCompanyTemplateService;
import com.ruoyi.common.core.text.Convert;

/**
 * 公司模板关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-07
 */
@Service
public class VideoCompanyTemplateServiceImpl implements IVideoCompanyTemplateService 
{
    @Autowired
    private VideoCompanyTemplateMapper videoCompanyTemplateMapper;

    /**
     * 查询公司模板关联
     * 
     * @param companyId 公司模板关联主键
     * @return 公司模板关联
     */
    @Override
    public VideoCompanyTemplate selectVideoCompanyTemplateByCompanyId(Integer companyId)
    {
        return videoCompanyTemplateMapper.selectVideoCompanyTemplateByCompanyId(companyId);
    }

    /**
     * 查询公司模板关联列表
     * 
     * @param videoCompanyTemplate 公司模板关联
     * @return 公司模板关联
     */
    @Override
    public List<VideoCompanyTemplate> selectVideoCompanyTemplateList(VideoCompanyTemplate videoCompanyTemplate)
    {
        return videoCompanyTemplateMapper.selectVideoCompanyTemplateList(videoCompanyTemplate);
    }

    /**
     * 新增公司模板关联
     * 
     * @param videoCompanyTemplate 公司模板关联
     * @return 结果
     */
    @Override
    public int insertVideoCompanyTemplate(VideoCompanyTemplate videoCompanyTemplate)
    {
        return videoCompanyTemplateMapper.insertVideoCompanyTemplate(videoCompanyTemplate);
    }

    /**
     * 修改公司模板关联
     * 
     * @param videoCompanyTemplate 公司模板关联
     * @return 结果
     */
    @Override
    public int updateVideoCompanyTemplate(VideoCompanyTemplate videoCompanyTemplate)
    {
        return videoCompanyTemplateMapper.updateVideoCompanyTemplate(videoCompanyTemplate);
    }

    /**
     * 批量删除公司模板关联
     * 
     * @param companyIds 需要删除的公司模板关联主键
     * @return 结果
     */
    @Override
    public int deleteVideoCompanyTemplateByCompanyIds(String companyIds)
    {
        return videoCompanyTemplateMapper.deleteVideoCompanyTemplateByCompanyIds(Convert.toStrArray(companyIds));
    }

    /**
     * 删除公司模板关联信息
     * 
     * @param companyId 公司模板关联主键
     * @return 结果
     */
    @Override
    public int deleteVideoCompanyTemplateByCompanyId(Integer companyId)
    {
        return videoCompanyTemplateMapper.deleteVideoCompanyTemplateByCompanyId(companyId);
    }
}
